From 5d89aeeda94dbdc5526f26c01fd6a22311ccdb05 Mon Sep 17 00:00:00 2001 From: "bren@br260.wolfson.cam.ac.uk" Date: Mon, 23 May 2005 20:04:24 +0000 Subject: [PATCH] bitkeeper revision 1.1518 (42923748Z36fQ-pX8ugPi-8ioexnOg) Add ethtools support to turn on/off Tx checksum offloading in the netfront driver. Signed-off-by: Jon Mason --- linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c index d8a14d2319..b7dbbd151f 100644 --- a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -928,6 +929,11 @@ vif_connect(struct net_private *np, netif_fe_interface_status_t *status) vif_show(np); } +static struct ethtool_ops network_ethtool_ops = +{ + .get_tx_csum = ethtool_op_get_tx_csum, + .set_tx_csum = ethtool_op_set_tx_csum, +}; /** Create a network device. * @param handle device handle @@ -973,6 +979,8 @@ static int create_netdev(int handle, struct net_device **val) dev->weight = 64; dev->features = NETIF_F_IP_CSUM; + SET_ETHTOOL_OPS(dev, &network_ethtool_ops); + if ((err = register_netdev(dev)) != 0) { printk(KERN_WARNING "%s> register_netdev err=%d\n", __FUNCTION__, err); goto exit; -- 2.30.2